import React from 'react';
import { MarkerType, Position } from '@xyflow/react';

export const initialNodes = [
  {
    id: '1',
    type: 'startEvent',
    data: {
      prologue: "",
      label: '根据角色定义获取营销热点信息',
    },
    position: { x: 50, y: 0 },
  },
  {
    id: '3',
    type: 'knowledgeBase',
    data: {
      label: '生成营销文案',
    },
    position: { x: 400, y: 100 },
    targetPosition: Position.Top,
    sourcePosition: Position.Bottom,
  },
  {
    id: '4',
    type: 'custom',
    position: { x: 100, y: 250 },
    data: {
      selects: {
        'handle-0': 'smoothstep',
        'handle-1': 'smoothstep',
        'handle-2': 'smoothstep',
      },
    }
  },
  {
    id: '5',
    type: 'dubboInvoke',
    data: {
      label: '发公众号',
    },
    // className: 'circle',
    // style: {
    //   background: '#2B6CB0',
    //   color: 'white',
    // },
    position: { x: 450, y: 300 },
    sourcePosition: Position.Right,
    targetPosition: Position.Left,
  },
  {
    id: '6',
    type: 'intelligentDecision',
    // style: {
    //   background: '#63B3ED',
    //   color: 'white',
    //   width: 100,
    // },
    data: {
      label: '发社区论坛',
    },
    position: { x: 450, y: 400 },
    sourcePosition: Position.Right,
    targetPosition: Position.Left,
  },
  {
    id: '7',
    type: 'endEvent',
    data: {
      label: '根据角色定义获取营销热点信息',
    },
    position: { x: 800, y: 350 },
  },
  {
    id: '99',
    type: 'default',
    className: 'annotation',
    data: {
      label: (
        <>
          自定义 <strong>AI员工</strong> 提升 <strong>生产力</strong>. 🥳
        </>
      ),
    },
    draggable: false,
    selectable: false,
    position: { x: 400, y: 550 },
  },
];

export const initialEdges = [
  { id: 'e1-3', source: '1', target: '3', animated: true, sourcePosition: Position.Top },
  {
    id: 'e3-4',
    source: '3',
    target: '4',
    animated: true,
    targetHandle: 'handle-0',
  },
  {
    id: 'e4-5',
    source: '4',
    target: '5',
    type: 'smoothstep',
    sourceHandle: 'handle-1',
    data: {
      selectIndex: 1,
    },
    markerEnd: {
      type: MarkerType.ArrowClosed,
    },
  },
  {
    id: 'e4-6',
    source: '4',
    target: '6',
    type: 'smoothstep',
    sourceHandle: 'handle-2',
    data: {
      selectIndex: 1,
    },
    markerEnd: {
      type: MarkerType.ArrowClosed,
    },
  },
  {
    id: 'e5-4',
    source: '5',
    target: '7',
    animated: true,
  },
  {
    id: 'e6-4',
    source: '6',
    target: '7',
    animated: true,
  },
];
